package com.markyao.controller.recos;

import com.markyao.recos.heartBeat.RecosHeartBeatService;
import com.markyao.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/recos/heartbeat/")
public class RecosHearbeatController {
    @Autowired
    RecosHeartBeatService recosHeartBeatService;

    @GetMapping("alive")
    public Result alive(@RequestParam("appName")String appName){
        return recosHeartBeatService.alive(appName);
    }

    @GetMapping("isHeartBeat")
    public Result isHeartBeat(@RequestParam("appName")String appName){
        return recosHeartBeatService.isHeartBeat(appName);
    }

}
